package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SuperPromotionMapper;
import com.ruoyi.system.domain.SuperPromotion;
import com.ruoyi.system.service.ISuperPromotionService;

/**
 * 促销活动Service业务层处理
 * 
 * @author xjf
 * @date 2025-08-13
 */
@Service
public class SuperPromotionServiceImpl implements ISuperPromotionService 
{
    @Autowired
    private SuperPromotionMapper superPromotionMapper;

    /**
     * 查询促销活动
     * 
     * @param id 促销活动主键
     * @return 促销活动
     */
    @Override
    public SuperPromotion selectSuperPromotionById(Long id)
    {
        return superPromotionMapper.selectSuperPromotionById(id);
    }

    /**
     * 查询促销活动列表
     * 
     * @param superPromotion 促销活动
     * @return 促销活动
     */
    @Override
    public List<SuperPromotion> selectSuperPromotionList(SuperPromotion superPromotion)
    {
        return superPromotionMapper.selectSuperPromotionList(superPromotion);
    }

    /**
     * 新增促销活动
     * 
     * @param superPromotion 促销活动
     * @return 结果
     */
    @Override
    public int insertSuperPromotion(SuperPromotion superPromotion)
    {
        return superPromotionMapper.insertSuperPromotion(superPromotion);
    }

    /**
     * 修改促销活动
     * 
     * @param superPromotion 促销活动
     * @return 结果
     */
    @Override
    public int updateSuperPromotion(SuperPromotion superPromotion)
    {
        return superPromotionMapper.updateSuperPromotion(superPromotion);
    }

    /**
     * 批量删除促销活动
     * 
     * @param ids 需要删除的促销活动主键
     * @return 结果
     */
    @Override
    public int deleteSuperPromotionByIds(Long[] ids)
    {
        return superPromotionMapper.deleteSuperPromotionByIds(ids);
    }

    /**
     * 删除促销活动信息
     * 
     * @param id 促销活动主键
     * @return 结果
     */
    @Override
    public int deleteSuperPromotionById(Long id)
    {
        return superPromotionMapper.deleteSuperPromotionById(id);
    }
}
